#!/bin/sh
#
# openil-init        Starts openil-init.
#

start() {
	printf "Starting openil-init: "
	/sbin/dhcpcd 1>/dev/null 2>&1 &
	/usr/sbin/resize2fs /dev/mmcblk0p2 1>/dev/null 2>&1 &
	/usr/bin/ota-versioncheck 1>/dev/null 2>&1 &
	echo "OK"
}
stop() {
	printf "Stopping openil-init: "
	killall dhcpcd
	echo "OK"
}
restart() {
	stop
	start
}

case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  restart|reload)
	restart
	;;
  *)
	echo "Usage: $0 {start|stop|restart}"
	exit 1
esac
exit $?

